﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Net;

namespace StProxyHelper.Entity
{
    [Serializable]
    public class HttpRequest
    {
        private CookieContainer _cookieContainer = null;
        private string _contentType = "application/x-www-form-urlencoded";
        private string _accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, image/vnd.wap.wbmp," +
            " application/x-shockwave-flash, application/x-silverlight, text/vnd.wap.wml," +
            " application/vnd.ms-excel, application/vnd.ms-powerpoint,"+
            " application/msword, application/x-ms-application, application/x-ms-xbap,"+
            " application/vnd.ms-xpsdocument, application/xaml+xml, application/x-silverlight-2-b1, */*";
        private string _userAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)";
        private Encoding _encoding = Encoding.Default;

        /// <summary>
        /// 设置或获取编码的值
        /// </summary>
        public Encoding Encoding
        {
            get { return _encoding; }
            set { _encoding = value; }
        }

        /// <summary>
        /// 设置或获取UserAgent Http标头的值
        /// </summary>
        public string UserAgent
        {
            get { return _userAgent; }
            set { _userAgent = value; }
        }

        /// <summary>
        /// 设置或获取Accept Http标头的值
        /// </summary>
        public string Accept
        {
            get { return _accept; }
            set { _accept = value; }
        }

        /// <summary>
        /// 设置或获取Content-Type Http标头的值
        /// </summary>
        public string ContentType
        {
            get { return _contentType; }
            set { _contentType = value; }
        }

        /// <summary>
        /// Cookie容器
        /// </summary>
        public CookieContainer CookieContainer
        {
            get { return _cookieContainer; }
            set { _cookieContainer = value; }
        }

        public HttpRequest()
        {
            _cookieContainer = new CookieContainer();
        }
    }
}
